With the growing popularity of the Internet, so is the demand for access to relational databases via the Internet. FIG. 1 illustrates a conventional network environment 10 which allows access to relational databases 18 over the Internet. One example of this conventional network environment 10 is the Net.Data™ network environment (also known as the“DB 2 WWW” network environment), developed by International Business Machines, Corp.™ The Net.Data™ network environment comprises web clients 12, a web server 14, a Net.Data™ gateway 16, and relational database management system (RDBMS) servers 18, such as those for DB2 databases. DB2 databases are known in the art and will not be described further here. The Net.Data™ gateway 16 and the RDBMS servers 18 may be located in the same server as the web server 14, or they may be located on separate machines. The Net.Data™ gateway 16 facilitates communication between the web clients 12 and the servers 18 executing RDBMS software. The Net.Data™ gateway 16 enables an application developer to build web applications for the RDBMS software using HyperText Markup Language (HTML) and dynamic Structured Query Language (SQL). An application developer creates HTML documents and SQL statements and stores them in macro language files at the Net.Dat™ gateway 16.
An end user of these applications sees only the HTML input forms on a web browser for his or her requests and the resulting reports. Users fill out the input forms, point and click to navigate the forms, and to access the RDBMS software and relational database. A complete SQL command is dynamically built by the gateway 16 according to the macro language files and/or with the user inputs. The SQL statement is built by calling a Net.Data™ SQL function. The SQL statement is sent to the server 18 executing the RDBMS software. The SQL command is performed by the RDBMS software, and the resulting output is merged into the HTML forms by the Net.Data™ gateway 16 for presentation to the user. An application developer creates HTML forms and SQL queries and stores them in macro language files at the Net.Data™ gateway 16.
However, the conventional Net.Data™ gateway 16 only allows the execution of one SQL function at a time. Thus, if a SQL function requires a particular parameter, and the parameter is a table, the application developer must pre-fetch the values for the table and place them into an auxiliary table. The auxiliary table is then passed as a parameter to the SQL function. The creation of the auxiliary table requires programming effort on the part of the application developer. It also requires memory for the storage of the auxiliary table. This is time-consuming and increases memory overhead.
Accordingly, there exists a need for a method and system for nested SQL functions. The method and system should reduce the amount of programming effort required and reduce memory overhead. The present invention addresses such a need.